﻿using System.ComponentModel;

namespace Little.Soldier.Licensing
{
    internal class LicenseInfo : License
    {
        private string _LicenseKey;
        private ushort _SerialNo;
        private string _ProductInfo;

        public override string LicenseKey
        {
            get
            {
                return _LicenseKey;
            }
        }

        public string ProductInfo
        {
            get
            {
                return _ProductInfo;
            }
        }

        public ushort SerialNo
        {
            get
            {
                return _SerialNo;
            }
        }

        internal bool FreeLicense
        {
            get
            {
                return _ProductInfo.EndsWith("3");
            }
        }

        public LicenseInfo(string key, ushort serialNo, string productInfo)
        {
            _LicenseKey = key;
            _SerialNo = serialNo;
            _ProductInfo = productInfo;
        }

        public override void Dispose()
        {
        }
    }
}
